import { http } from '@/common/service/service.js' 
import configService from '@/common/service/config.service.js';
// 检查登录信息
export function apiBindingLogin(query) {
	return http.get('/auth/u2/binding/enhance', {
		params: query
	})
}

// 微信一键登录
export function apiWxLogin(query) {
	return http.post('/auth/u2/wxLogin', query)
}

// 已绑定过微信重新登录
export function apiWxReLogin(query) {
	return http.post('/auth/student/openIdLogin', query)
}

// 获取图形验证码
export function apiGetVerificationImageCode(query) {
	return http.get('/auth/student/imageCode', {
		params: query
	})
}

// 获取短信验证码

export function apiGetVerificationMessageCode(query) {
	return http.get('/auth/student/sendVerificationCode', {
		params: query
	})
}
export function apiSendVerificationMessageCode(query) {
	return http.post('/auth/student/sendVerificationCode', query)
}

// 通过手机号登录
export function apiLoginBymobile(query) {
	return http.post('/auth/student/mobileLogin', query)
}

// 退出登录
export function apiLogout(query) {
	return http.get('/auth/student/logout', {
		params: query
	})
}
//绑定学员号
export function apiBindStudntCode(query) {
	return http.post('/user/add/binding',query)
}
//获取学员列表
export function apiGetStudentList(query) {
	return http.get('/user/binding/list', {
		query
	})
}
//绑定解绑学号
export function apiBindStudentCode(query) {
	return http.post('/user/bindOrUnbind', query)
}

// 获取用于信息
export function apiGetUserInfo(query) {
	return http.get('/user/info', {
		params: query
	})
}

// 修改用户信息
export function apiSaveUserInfo(query) {
	return http.post('/user/save/userInfo', query)
}

// 绑定学员（批量 单绑都可）
export function apiAddBinding(query) {
	return http.post('/user/add/binding ', query)
}

// ——————————————————————————————————————————————————
// 练习记录 阅读 听力列表接口
export function apiGetIeltsRallList(params) {
	console.log('params',params)
	return http.get('/record/ielts/allList', {params});
}
// --------------------------- 往下是绑定学员列表的信息

// 绑定学员获取验证码
export function apiSendVerificationCode(query) {
	return http.get('/user/send/verificationCode', {
        params: query
    })
}

// 获取通过手机号查询到的学员信息列表
export function apiGetStudentListByPhone(query) {
    return http.get('/user/u2/students', {
        params: query
    })
}

// 保存用户设备信息
export function apiSaveDeviceInfo(query) {
	return http.post('/user/save/deviceInfo', query)
}
